/*
 * matrix_mem.h
 *
 *  Created on: 29/11/2010
 *      Author: maqui01
 */

#ifndef MATRIX_MEM_H_
#define MATRIX_MEM_H_

#include "fileStructs.h"
#include <stdbool.h>

typedef struct{
	fHandler *handler[2];
	unsigned long regMax;
	regMat *matrix;
} mHandler;

int M_CREATE(const char *nombre_fisico, unsigned tamReg, unsigned maxFilCol);
mHandler *M_OPEN (const char* nombre_fisico, int modo);
int M_CLOSE (mHandler *handler);
int M_READ (mHandler *handler, unsigned posFil, unsigned posCol, void* reg);
bool M_EXISTE_REG (mHandler *handler, unsigned posFil, unsigned posCol );
int M_WRITE (mHandler *handler, unsigned posFil, unsigned posCol, const void* reg);
int M_UPDATE (mHandler *handler, unsigned posFil, unsigned posCol, const void* reg);
int M_DELETE (mHandler *handler, unsigned posFil, unsigned posCol);
int M_DESTROY(const char* nombre_fisico);


#endif /* MATRIX_MEM_H_ */
